<?php
namespace app\index\controller;
use app\common\controller\Frontend;
use app\common\service\IndexService;
use think\Db;
class Random extends Frontend
{
    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
//    protected $layout = '';
    public function index()
    {
        $random_arr = ['A','B','C','D','E','F'];
        $one_time_data = [];
        for($i=1;$i<=40;$i++){
            shuffle($random_arr);
            $one_time_data[] = [
                'name'     =>'',
                'product_1'=>$random_arr[0],
                'product_2'=>$random_arr[1],
                'product_3'=>$random_arr[2],
                'product_4'=>$random_arr[3],
                'product_5'=>$random_arr[4],
                'product_6'=>$random_arr[5],
            ];
        }
        Db::name('random_weiwei')->insertAll($one_time_data);
        echo 'success';

    }
}
